package com.xiaohe.dao;

import com.xiaohe.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao {

    /**
     * 查询所有用户信息
     * */
    @Select("select * from user")
   List<User> findAll();

    /**
     * 增加用户
     * */
    @Insert("insert into user(username,address) values(#{username},#{address})")
    void create(User user);
}
